home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / Devices.a < prev    next >
Text File  |  1996-05-01  |  32KB  |  1,090 lines

  1. ;
  2. ;    File:        Devices.a
  3. ;
  4. ;    Contains:    Device Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5 and 8
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__DEVICES__') = 'UNDEFINED' THEN
  19. __DEVICES__ SET 1
  20.  
  21.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  22.     include 'OSUtils.a'
  23.     ENDIF
  24.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  25.     include 'Files.a'
  26.     ENDIF
  27.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  28.     include 'Quickdraw.a'
  29.     ENDIF
  30.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  31.     include 'Events.a'
  32.     ENDIF
  33.     IF FOR_SYSTEM7_ONLY THEN
  34.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  35.     include 'Dialogs.a'
  36.     ENDIF
  37.     ENDIF
  38.     IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
  39.     include 'Kernel.a'
  40.     ENDIF
  41.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  42.     include 'NameRegistry.a'
  43.     ENDIF
  44.     IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
  45.     include 'CodeFragments.a'
  46.     ENDIF
  47.     IF &TYPE('__DRIVERFAMILYMATCHING__') = 'UNDEFINED' THEN
  48.     include 'DriverFamilyMatching.a'
  49.     ENDIF
  50.     IF &TYPE('__IOITERATOR__') = 'UNDEFINED' THEN
  51.     include 'IOIterator.a'
  52.     ENDIF
  53. ;  Values of the 'message' parameter to a Chooser device package 
  54.  
  55. chooserInitMsg                    EQU        11                    ; the user selected this device package 
  56. newSelMsg                        EQU        12                    ; the user made new device selections 
  57. fillListMsg                        EQU        13                    ; fill the device list with choices 
  58. getSelMsg                        EQU        14                    ; mark one or more choices as selected 
  59. selectMsg                        EQU        15                    ; the user made a selection 
  60. deselectMsg                        EQU        16                    ; the user canceled a selection 
  61. terminateMsg                    EQU        17                    ; allows device package to clean up 
  62. buttonMsg                        EQU        19                    ; the user selected a button 
  63. ;  Values of the 'caller' parameter to a Chooser device package 
  64.  
  65. chooserID                        EQU        1
  66. ;  Values of the 'message' parameter to a Control Panel 'cdev' 
  67.  
  68. initDev                            EQU        0                    ;Time for cdev to initialize itself
  69. hitDev                            EQU        1                    ;Hit on one of my items
  70. closeDev                        EQU        2                    ;Close yourself
  71. nulDev                            EQU        3                    ;Null event
  72. updateDev                        EQU        4                    ;Update event
  73. activDev                        EQU        5                    ;Activate event
  74. deactivDev                        EQU        6                    ;Deactivate event
  75. keyEvtDev                        EQU        7                    ;Key down/auto key
  76. macDev                            EQU        8                    ;Decide whether or not to show up
  77. undoDev                            EQU        9
  78. cutDev                            EQU        10
  79. copyDev                            EQU        11
  80. pasteDev                        EQU        12
  81. clearDev                        EQU        13
  82. cursorDev                        EQU        14
  83. ;  Special values a Control Panel 'cdev' can return 
  84.  
  85. cdevGenErr                        EQU        -1                    ;General error; gray cdev w/o alert
  86. cdevMemErr                        EQU        0                    ;Memory shortfall; alert user please
  87. cdevResErr                        EQU        1                    ;Couldn't get a needed resource; alert
  88. cdevUnset                        EQU        3                    ; cdevValue is initialized to this
  89. ;  Values of the 'message' parameter to a Monitor 'mntr' 
  90.  
  91. initMsg                            EQU        1                    ;initialization
  92. okMsg                            EQU        2                    ;user clicked OK button
  93. cancelMsg                        EQU        3                    ;user clicked Cancel button
  94. hitMsg                            EQU        4                    ;user clicked control in Options dialog
  95. nulMsg                            EQU        5                    ;periodic event
  96. updateMsg                        EQU        6                    ;update event
  97. activateMsg                        EQU        7                    ;not used
  98. deactivateMsg                    EQU        8                    ;not used
  99. keyEvtMsg                        EQU        9                    ;keyboard event
  100. superMsg                        EQU        10                    ;show superuser controls
  101. normalMsg                        EQU        11                    ;show only normal controls
  102. startupMsg                        EQU        12                    ;code has been loaded
  103. ;  control codes for DeskAccessories 
  104.  
  105. goodbye                            EQU        -1                    ; heap being reinitialized 
  106. killCode                        EQU        1                    ; KillIO requested 
  107. accEvent                        EQU        64                    ; handle an event 
  108. accRun                            EQU        65                    ; time for periodic action 
  109. accCursor                        EQU        66                    ; change cursor shape 
  110. accMenu                            EQU        67                    ; handle menu item 
  111. accUndo                            EQU        68                    ; handle undo command 
  112. accCut                            EQU        70                    ; handle cut command 
  113. accCopy                            EQU        71                    ; handle copy command 
  114. accPaste                        EQU        72                    ; handle paste command 
  115. accClear                        EQU        73                    ; handle clear command 
  116. ;  Control/Status Call Codes 
  117.  
  118. drvStsCode                        EQU        8                    ; status call code for drive status 
  119. ejectCode                        EQU        7                    ; control call eject code 
  120. tgBuffCode                        EQU        8                    ; set tag buffer code 
  121. ;  miscellaneous Device Manager constants 
  122.  
  123. ioInProgress                    EQU        1                    ; predefined value of ioResult while I/O is pending 
  124. aRdCmd                            EQU        2                    ; low byte of ioTrap for Read calls 
  125. aWrCmd                            EQU        3                    ; low byte of ioTrap for Write calls 
  126. asyncTrpBit                        EQU        10                    ; trap word modifier 
  127. noQueueBit                        EQU        9                    ; trap word modifier 
  128. ;  flags used in the driver header and device control entry 
  129.  
  130. dReadEnable                        EQU        0                    ; set if driver responds to read requests 
  131. dWritEnable                        EQU        1                    ; set if driver responds to write requests 
  132. dCtlEnable                        EQU        2                    ; set if driver responds to control requests 
  133. dStatEnable                        EQU        3                    ; set if driver responds to status requests 
  134. dNeedGoodBye                    EQU        4                    ; set if driver needs time for performing periodic tasks 
  135. dNeedTime                        EQU        5                    ; set if driver needs time for performing periodic tasks 
  136. dNeedLock                        EQU        6                    ; set if driver must be locked in memory as soon as it is opened 
  137. dNeedLockMask                    EQU        $4000                ; set if driver must be locked in memory as soon as it is opened 
  138. dNeedTimeMask                    EQU        $2000                ; set if driver needs time for performing periodic tasks 
  139. dNeedGoodByeMask                EQU        $1000                ; set if driver needs to be called before the application heap is initialized 
  140. dStatEnableMask                    EQU        $0800                ; set if driver responds to status requests 
  141. dCtlEnableMask                    EQU        $0400                ; set if driver responds to control requests 
  142. dWritEnableMask                    EQU        $0200                ; set if driver responds to write requests 
  143. dReadEnableMask                    EQU        $0100                ; set if driver responds to read requests 
  144. ;  run-time flags used in the device control entry 
  145.  
  146. dOpened                            EQU        5                    ; driver is open 
  147. dRAMBased                        EQU        6                    ; dCtlDriver is a handle (1) or pointer (0) 
  148. drvrActive                        EQU        7                    ; driver is currently processing a request 
  149. drvrActiveMask                    EQU        $0080                ; driver is currently processing a request 
  150. dRAMBasedMask                    EQU        $0040                ; dCtlDriver is a handle (1) or pointer (0) 
  151. dOpenedMask                        EQU        $0020                ; driver is open 
  152. DRVRHeader                RECORD 0
  153. drvrFlags                 ds.w    1                ; offset: $0 (0)
  154. drvrDelay                 ds.w    1                ; offset: $2 (2)
  155. drvrEMask                 ds.w    1                ; offset: $4 (4)
  156. drvrMenu                 ds.w    1                ; offset: $6 (6)
  157. drvrOpen                 ds.w    1                ; offset: $8 (8)
  158. drvrPrime                 ds.w    1                ; offset: $A (10)
  159. drvrCtl                     ds.w    1                ; offset: $C (12)
  160. drvrStatus                 ds.w    1                ; offset: $E (14)
  161. drvrClose                 ds.w    1                ; offset: $10 (16)
  162. drvrName                 ds.b    1                ; offset: $12 (18) <-- really an array of length one
  163.                          ORG 20
  164. sizeof                     EQU *                    ; size:   $14 (20)
  165.                         ENDR
  166. ; typedef struct DRVRHeader *            DRVRHeaderPtr
  167.  
  168. ; typedef DRVRHeaderPtr *                DRVRHeaderHandle
  169.  
  170.     IF FOR_SYSTEM7_ONLY THEN
  171. DCtlEntry                RECORD 0
  172. dCtlDriver                 ds.l    1                ; offset: $0 (0)
  173. dCtlFlags                 ds.w    1                ; offset: $4 (4)
  174. dCtlQHdr                 ds        QHdr            ; offset: $6 (6)
  175. dCtlPosition             ds.l    1                ; offset: $10 (16)
  176. dCtlStorage                 ds.l    1                ; offset: $14 (20)
  177. dCtlRefNum                 ds.w    1                ; offset: $18 (24)
  178. dCtlCurTicks             ds.l    1                ; offset: $1A (26)
  179. dCtlWindow                 ds.l    1                ; offset: $1E (30)
  180. dCtlDelay                 ds.w    1                ; offset: $22 (34)
  181. dCtlEMask                 ds.w    1                ; offset: $24 (36)
  182. dCtlMenu                 ds.w    1                ; offset: $26 (38)
  183. sizeof                     EQU *                    ; size:   $28 (40)
  184.                         ENDR
  185.     ELSE
  186. DCtlEntry                RECORD 0
  187. dCtlDriver                 ds.l    1                ; offset: $0 (0)
  188. dCtlFlags                 ds.w    1                ; offset: $4 (4)
  189. dCtlQHdr                 ds        QHdr            ; offset: $6 (6)
  190. dCtlPosition             ds.l    1                ; offset: $10 (16)
  191. dCtlStorage                 ds.l    1                ; offset: $14 (20)
  192. dCtlRefNum                 ds.w    1                ; offset: $18 (24)
  193. dCtlCurTicks             ds.l    1                ; offset: $1A (26)
  194. dCtlWindow                 ds.l    1                ; offset: $1E (30)
  195. dCtlDelay                 ds.w    1                ; offset: $22 (34)
  196. dCtlEMask                 ds.w    1                ; offset: $24 (36)
  197. dCtlMenu                 ds.w    1                ; offset: $26 (38)
  198. sizeof                     EQU *                    ; size:   $28 (40)
  199.                         ENDR
  200.     ENDIF
  201. ; typedef struct DCtlEntry *            DCtlPtr
  202.  
  203. ; typedef DCtlPtr *                        DCtlHandle
  204.  
  205.     IF FOR_SYSTEM7_ONLY THEN
  206. AuxDCE                    RECORD 0
  207. dCtlDriver                 ds.l    1                ; offset: $0 (0)
  208. dCtlFlags                 ds.w    1                ; offset: $4 (4)
  209. dCtlQHdr                 ds        QHdr            ; offset: $6 (6)
  210. dCtlPosition             ds.l    1                ; offset: $10 (16)
  211. dCtlStorage                 ds.l    1                ; offset: $14 (20)
  212. dCtlRefNum                 ds.w    1                ; offset: $18 (24)
  213. dCtlCurTicks             ds.l    1                ; offset: $1A (26)
  214. dCtlWindow                 ds.l    1                ; offset: $1E (30)
  215. dCtlDelay                 ds.w    1                ; offset: $22 (34)
  216. dCtlEMask                 ds.w    1                ; offset: $24 (36)
  217. dCtlMenu                 ds.w    1                ; offset: $26 (38)
  218. dCtlSlot                 ds.b    1                ; offset: $28 (40)
  219. dCtlSlotId                 ds.b    1                ; offset: $29 (41)
  220. dCtlDevBase                 ds.l    1                ; offset: $2A (42)
  221. dCtlOwner                 ds.l    1                ; offset: $2E (46)
  222. dCtlExtDev                 ds.b    1                ; offset: $32 (50)
  223. fillByte                 ds.b    1                ; offset: $33 (51)
  224. dCtlNodeID                 ds.l    1                ; offset: $34 (52)
  225. sizeof                     EQU *                    ; size:   $38 (56)
  226.                         ENDR
  227. ; typedef struct AuxDCE *                AuxDCEPtr
  228.  
  229. ; typedef AuxDCEPtr *                    AuxDCEHandle
  230.  
  231.     ELSE
  232. AuxDCE                    RECORD 0
  233. dCtlDriver                 ds.l    1                ; offset: $0 (0)
  234. dCtlFlags                 ds.w    1                ; offset: $4 (4)
  235. dCtlQHdr                 ds        QHdr            ; offset: $6 (6)
  236. dCtlPosition             ds.l    1                ; offset: $10 (16)
  237. dCtlStorage                 ds.l    1                ; offset: $14 (20)
  238. dCtlRefNum                 ds.w    1                ; offset: $18 (24)
  239. dCtlCurTicks             ds.l    1                ; offset: $1A (26)
  240. dCtlWindow                 ds.l    1                ; offset: $1E (30)
  241. dCtlDelay                 ds.w    1                ; offset: $22 (34)
  242. dCtlEMask                 ds.w    1                ; offset: $24 (36)
  243. dCtlMenu                 ds.w    1                ; offset: $26 (38)
  244. dCtlSlot                 ds.b    1                ; offset: $28 (40)
  245. dCtlSlotId                 ds.b    1                ; offset: $29 (41)
  246. dCtlDevBase                 ds.l    1                ; offset: $2A (42)
  247. dCtlOwner                 ds.l    1                ; offset: $2E (46)
  248. dCtlExtDev                 ds.b    1                ; offset: $32 (50)
  249. fillByte                 ds.b    1                ; offset: $33 (51)
  250. dCtlNodeID                 ds.l    1                ; offset: $34 (52)
  251. sizeof                     EQU *                    ; size:   $38 (56)
  252.                         ENDR
  253. ; typedef struct AuxDCE *                AuxDCEPtr
  254.  
  255. ; typedef AuxDCEPtr *                    AuxDCEHandle
  256.  
  257.     ENDIF
  258. ;     The NDRV Driver IO Entry Point and Commands 
  259. ; typedef UInt16                         UnitNumber
  260.  
  261. ; typedef UInt32                         DriverOpenCount
  262.  
  263. ; typedef SInt16                         DriverRefNum
  264.  
  265. ; typedef SInt16                         DriverFlags
  266.  
  267. ; typedef UInt32                         IOCommandCode
  268.  
  269.  
  270. kOpenCommand                    EQU        0
  271. kCloseCommand                    EQU        1
  272. kReadCommand                    EQU        2
  273. kWriteCommand                    EQU        3
  274. kControlCommand                    EQU        4
  275. kStatusCommand                    EQU        5
  276. kKillIOCommand                    EQU        6
  277. kInitializeCommand                EQU        7                    ; init driver and device
  278. kFinalizeCommand                EQU        8                    ; shutdown driver and device
  279. kReplaceCommand                    EQU        9                    ; replace an old driver
  280. kSupersededCommand                EQU        10                    ; prepare to be replaced by a new driver
  281.  
  282.  
  283. ; typedef UInt32                         IOCommandKind
  284.  
  285.  
  286. kSynchronousIOCommandKind        EQU        $00000001
  287. kAsynchronousIOCommandKind        EQU        $00000002
  288. kImmediateIOCommandKind            EQU        $00000004
  289. DriverInitInfo            RECORD 0
  290. refNum                     ds.w    1                ; offset: $0 (0)
  291. deviceEntry                 ds        RegEntryRef        ; offset: $2 (2)
  292. sizeof                     EQU *                    ; size:   $12 (18)
  293.                         ENDR
  294. ; typedef struct DriverInitInfo *        DriverInitInfoPtr
  295.  
  296. DriverReplaceInfo        RECORD 0
  297. f                         ds        DriverInitInfo
  298. sizeof                     EQU *                    ; size:   $12 (18)
  299.                         ENDR
  300.  
  301.  
  302. ; typedef struct DriverInitInfo *        DriverReplaceInfoPtr
  303.  
  304. DriverFinalInfo            RECORD 0
  305. refNum                     ds.w    1                ; offset: $0 (0)
  306. deviceEntry                 ds        RegEntryRef        ; offset: $2 (2)
  307. sizeof                     EQU *                    ; size:   $12 (18)
  308.                         ENDR
  309. ; typedef struct DriverFinalInfo *        DriverFinalInfoPtr
  310.  
  311. DriverSupersededInfo    RECORD 0
  312. f                         ds        DriverFinalInfo
  313. sizeof                     EQU *                    ; size:   $12 (18)
  314.                         ENDR
  315.  
  316.  
  317. ; typedef struct DriverFinalInfo *        DriverSupersededInfoPtr
  318.  
  319.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  320. ;  Contents are command specific
  321. IOCommandContents        RECORD 0
  322. pb                         ds.l    1                ; offset: $0 (0)
  323.                          ORG 0
  324. initialInfo                 ds.l    1                ; offset: $0 (0)
  325.                          ORG 0
  326. finalInfo                 ds.l    1                ; offset: $0 (0)
  327.                          ORG 0
  328. replaceInfo                 ds.l    1                ; offset: $0 (0)
  329.                          ORG 0
  330. supersededInfo             ds.l    1                ; offset: $0 (0)
  331. sizeof                     EQU *                    ; size:   $4 (4)
  332.                         ENDR
  333.     ELSE
  334. ParamBlockRec            RECORD 0
  335. qLink                     ds.l    1                ; offset: $0 (0)        ; queue link in header
  336. qType                     ds.w    1                ; offset: $4 (4)        ; type byte for safety check
  337. ioTrap                     ds.w    1                ; offset: $6 (6)        ; FS: the Trap
  338. ioCmdAddr                 ds.l    1                ; offset: $8 (8)        ; FS: address to dispatch to
  339. ioCompletion             ds.l    1                ; offset: $C (12)        ; completion routine addr (0 for synch calls)
  340. ioResult                 ds.w    1                ; offset: $10 (16)        ; result code
  341. ioNamePtr                 ds.l    1                ; offset: $12 (18)        ; ptr to Vol:FileName string
  342. ioVRefNum                 ds.w    1                ; offset: $16 (22)        ; volume refnum (DrvNum for Eject and MountVol)
  343. ioRefNum                 ds.w    1                ; offset: $18 (24)        ; refNum for I/O operation
  344. ioVersNum                 ds.b    1                ; offset: $1A (26)        ; version number
  345. ioPermssn                 ds.b    1                ; offset: $1B (27)        ; Open: permissions (byte)
  346. ioMisc                     ds.l    1                ; offset: $1C (28)        ; Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type)
  347. ioBuffer                 ds.l    1                ; offset: $20 (32)        ; data buffer Ptr
  348. ioReqCount                 ds.l    1                ; offset: $24 (36)        ; requested byte count; also = ioNewDirID
  349. ioActCount                 ds.l    1                ; offset: $28 (40)        ; actual byte count completed
  350. ioPosMode                 ds.w    1                ; offset: $2C (44)        ; initial file positioning
  351. ioPosOffset                 ds.l    1                ; offset: $2E (46)        ; file position offset
  352.                          ORG 24
  353. ioCRefNum                 ds.w    1                ; offset: $18 (24)        ; refNum for I/O operation
  354. csCode                     ds.w    1                ; offset: $1A (26)        ; word for control status code
  355. csParam                     ds.w    11                ; offset: $1C (28)        ; operation-defined parameters
  356. sizeof                     EQU *                    ; size:   $32 (50)
  357.                         ENDR
  358. ; typedef struct ParamBlockRec *        ParmBlkPtr
  359.  
  360. IOCommandContents        RECORD 0
  361. pb                         ds.l    1                ; offset: $0 (0)
  362.                          ORG 0
  363. initialInfo                 ds.l    1                ; offset: $0 (0)
  364.                          ORG 0
  365. finalInfo                 ds.l    1                ; offset: $0 (0)
  366.                          ORG 0
  367. replaceInfo                 ds.l    1                ; offset: $0 (0)
  368.                          ORG 0
  369. supersededInfo             ds.l    1                ; offset: $0 (0)
  370. sizeof                     EQU *                    ; size:   $4 (4)
  371.                         ENDR
  372.     ENDIF
  373. ;  Record to describe a file-based driver candidate 
  374. FileBasedDriverRecord    RECORD 0
  375. theSpec                     ds        FSSpec            ; offset: $0 (0)        ;  file specification
  376. theType                     ds        DriverType        ; offset: $46 (70)        ;  nameInfoStr + version number
  377. compatibleProp             ds.b    1                ; offset: $6A (106)        ;  true if matched using a compatible name
  378. pad                         ds.b    3                ; offset: $6B (107)        ;  alignment
  379. sizeof                     EQU *                    ; size:   $6E (110)
  380.                         ENDR
  381. ; typedef struct FileBasedDriverRecord * FileBasedDriverRecordPtr
  382.  
  383. ;  Driver Loader API 
  384.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  385. ;
  386. ; extern SInt16 HigherDriverVersion(NumVersion *driverVersion1, NumVersion *driverVersion2)
  387. ;
  388.     IF GENERATINGCFM THEN
  389.         IMPORT_CFM_FUNCTION HigherDriverVersion
  390.     ENDIF
  391.  
  392. ;
  393. ; extern OSErr VerifyFragmentAsDriver(CFragConnectionID fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  394. ;
  395.     IF GENERATINGCFM THEN
  396.         IMPORT_CFM_FUNCTION VerifyFragmentAsDriver
  397.     ENDIF
  398.  
  399. ;
  400. ; extern OSErr GetDriverMemoryFragment(Ptr memAddr, long length, ConstStr63Param fragName, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  401. ;
  402.     IF GENERATINGCFM THEN
  403.         IMPORT_CFM_FUNCTION GetDriverMemoryFragment
  404.     ENDIF
  405.  
  406. ;
  407. ; extern OSErr GetDriverDiskFragment(FSSpecPtr fragmentSpec, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  408. ;
  409.     IF GENERATINGCFM THEN
  410.         IMPORT_CFM_FUNCTION GetDriverDiskFragment
  411.     ENDIF
  412.  
  413.     IF FOR_SYSTEM7_ONLY THEN
  414. ;
  415. ; extern OSErr InstallDriverFromFragment(CFragConnectionID fragmentConnID, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  416. ;
  417.     IF GENERATINGCFM THEN
  418.         IMPORT_CFM_FUNCTION InstallDriverFromFragment
  419.     ENDIF
  420.  
  421. ;
  422. ; extern OSErr InstallDriverFromFile(FSSpecPtr fragmentSpec, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  423. ;
  424.     IF GENERATINGCFM THEN
  425.         IMPORT_CFM_FUNCTION InstallDriverFromFile
  426.     ENDIF
  427.  
  428. ;
  429. ; extern OSErr InstallDriverFromMemory(Ptr memory, long length, ConstStr63Param fragName, RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  430. ;
  431.     IF GENERATINGCFM THEN
  432.         IMPORT_CFM_FUNCTION InstallDriverFromMemory
  433.     ENDIF
  434.  
  435. ;
  436. ; extern OSErr InstallDriverFromDisk(Ptr theDriverName, RegEntryID *theDevice, UnitNumber theBeginningUnit, UnitNumber theEndingUnit, DriverRefNum *theRefNum)
  437. ;
  438.     IF GENERATINGCFM THEN
  439.         IMPORT_CFM_FUNCTION InstallDriverFromDisk
  440.     ENDIF
  441.  
  442. ;
  443. ; extern OSErr FindDriversForDevice(RegEntryID *device, FSSpec *fragmentSpec, DriverDescription *fileDriverDesc, Ptr *memAddr, long *length, StringPtr fragName, DriverDescription *memDriverDesc)
  444. ;
  445.     IF GENERATINGCFM THEN
  446.         IMPORT_CFM_FUNCTION FindDriversForDevice
  447.     ENDIF
  448.  
  449. ;
  450. ; extern OSErr FindDriverCandidates(RegEntryID *deviceID, Ptr *propBasedDriver, RegPropertyValueSize *propBasedDriverSize, StringPtr deviceName, DriverType *propBasedDriverType, Boolean *gotPropBasedDriver, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount *nFileBasedDrivers)
  451. ;
  452.     IF GENERATINGCFM THEN
  453.         IMPORT_CFM_FUNCTION FindDriverCandidates
  454.     ENDIF
  455.  
  456. ;
  457. ; extern OSErr ScanDriverCandidates(RegEntryID *deviceID, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount nFileBasedDrivers, FileBasedDriverRecordPtr matchingDrivers, ItemCount *nMatchingDrivers)
  458. ;
  459.     IF GENERATINGCFM THEN
  460.         IMPORT_CFM_FUNCTION ScanDriverCandidates
  461.     ENDIF
  462.  
  463. ;
  464. ; extern OSErr GetDriverForDevice(RegEntryID *device, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  465. ;
  466.     IF GENERATINGCFM THEN
  467.         IMPORT_CFM_FUNCTION GetDriverForDevice
  468.     ENDIF
  469.  
  470. ;
  471. ; extern OSErr InstallDriverForDevice(RegEntryID *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  472. ;
  473.     IF GENERATINGCFM THEN
  474.         IMPORT_CFM_FUNCTION InstallDriverForDevice
  475.     ENDIF
  476.  
  477. ;
  478. ; extern OSErr GetDriverInformation(DriverRefNum refNum, UnitNumber *unitNum, DriverFlags *flags, DriverOpenCount *count, StringPtr name, RegEntryID *device, CFragSystem7Locator *driverLoadLocation, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescription *driverDesc)
  479. ;
  480.     IF GENERATINGCFM THEN
  481.         IMPORT_CFM_FUNCTION GetDriverInformation
  482.     ENDIF
  483.  
  484.     ELSE
  485. ;
  486. ; extern OSErr InstallDriverFromFragment(CFragConnectionID fragmentConnID, RegEntryRef *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  487. ;
  488.     IF GENERATINGCFM THEN
  489.         IMPORT_CFM_FUNCTION InstallDriverFromFragment
  490.     ENDIF
  491.  
  492. ;
  493. ; extern OSErr InstallDriverFromFile(FSSpecPtr fragmentSpec, RegEntryRef *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  494. ;
  495.     IF GENERATINGCFM THEN
  496.         IMPORT_CFM_FUNCTION InstallDriverFromFile
  497.     ENDIF
  498.  
  499. ;
  500. ; extern OSErr InstallDriverFromMemory(Ptr memory, long length, ConstStr63Param fragName, RegEntryRef *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  501. ;
  502.     IF GENERATINGCFM THEN
  503.         IMPORT_CFM_FUNCTION InstallDriverFromMemory
  504.     ENDIF
  505.  
  506. ;
  507. ; extern OSErr InstallDriverFromDisk(Ptr theDriverName, RegEntryRef *theDevice, UnitNumber theBeginningUnit, UnitNumber theEndingUnit, DriverRefNum *theRefNum)
  508. ;
  509.     IF GENERATINGCFM THEN
  510.         IMPORT_CFM_FUNCTION InstallDriverFromDisk
  511.     ENDIF
  512.  
  513. ;
  514. ; extern OSErr FindDriversForDevice(RegEntryRef *device, FSSpec *fragmentSpec, DriverDescription *fileDriverDesc, Ptr *memAddr, long *length, StringPtr fragName, DriverDescription *memDriverDesc)
  515. ;
  516.     IF GENERATINGCFM THEN
  517.         IMPORT_CFM_FUNCTION FindDriversForDevice
  518.     ENDIF
  519.  
  520. ;
  521. ; extern OSErr FindDriverCandidates(RegEntryRef *deviceID, Ptr *propBasedDriver, UInt32 *propBasedDriverSize, StringPtr deviceName, DriverType *propBasedDriverType, Boolean *gotPropBasedDriver, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount *nFileBasedDrivers)
  522. ;
  523.     IF GENERATINGCFM THEN
  524.         IMPORT_CFM_FUNCTION FindDriverCandidates
  525.     ENDIF
  526.  
  527. ;
  528. ; extern OSErr ScanDriverCandidates(RegEntryRef *deviceID, FileBasedDriverRecordPtr fileBasedDrivers, ItemCount nFileBasedDrivers, FileBasedDriverRecordPtr matchingDrivers, ItemCount *nMatchingDrivers)
  529. ;
  530.     IF GENERATINGCFM THEN
  531.         IMPORT_CFM_FUNCTION ScanDriverCandidates
  532.     ENDIF
  533.  
  534. ;
  535. ; extern OSErr GetDriverForDevice(RegEntryRef *device, CFragConnectionID *fragmentConnID, DriverEntryPointPtr *fragmentMain, DriverDescriptionPtr *driverDesc)
  536. ;
  537.     IF GENERATINGCFM THEN
  538.         IMPORT_CFM_FUNCTION GetDriverForDevice
  539.     ENDIF
  540.  
  541. ;
  542. ; extern OSErr InstallDriverForDevice(RegEntryRef *device, UnitNumber beginningUnit, UnitNumber endingUnit, DriverRefNum *refNum)
  543. ;
  544.     IF GENERATINGCFM THEN
  545.         IMPORT_CFM_FUNCTION InstallDriverForDevice
  546.     ENDIF
  547.  
  548.     ENDIF
  549. ;
  550. ; extern OSErr SetDriverClosureMemory(CFragConnectionID fragmentConnID, Boolean holdDriverMemory)
  551. ;
  552.     IF GENERATINGCFM THEN
  553.         IMPORT_CFM_FUNCTION SetDriverClosureMemory
  554.     ENDIF
  555.  
  556. ;
  557. ; extern OSErr ReplaceDriverWithFragment(DriverRefNum theRefNum, CFragConnectionID fragmentConnID)
  558. ;
  559.     IF GENERATINGCFM THEN
  560.         IMPORT_CFM_FUNCTION ReplaceDriverWithFragment
  561.     ENDIF
  562.  
  563. ;
  564. ; extern OSErr OpenInstalledDriver(DriverRefNum refNum, SInt8 ioPermission)
  565. ;
  566.     IF GENERATINGCFM THEN
  567.         IMPORT_CFM_FUNCTION OpenInstalledDriver
  568.     ENDIF
  569.  
  570. ;
  571. ; extern OSErr RenameDriver(DriverRefNum refNum, StringPtr newDriverName)
  572. ;
  573.     IF GENERATINGCFM THEN
  574.         IMPORT_CFM_FUNCTION RenameDriver
  575.     ENDIF
  576.  
  577. ;
  578. ; extern OSErr RemoveDriver(DriverRefNum refNum, Boolean immediate)
  579. ;
  580.     IF GENERATINGCFM THEN
  581.         IMPORT_CFM_FUNCTION RemoveDriver
  582.     ENDIF
  583.  
  584. ;
  585. ; extern OSErr LookupDrivers(UnitNumber beginningUnit, UnitNumber endingUnit, Boolean emptyUnits, ItemCount *returnedRefNums, DriverRefNum *refNums)
  586. ;
  587.     IF GENERATINGCFM THEN
  588.         IMPORT_CFM_FUNCTION LookupDrivers
  589.     ENDIF
  590.  
  591. ;
  592. ; extern UnitNumber HighestUnitNumber(void )
  593. ;
  594.     IF GENERATINGCFM THEN
  595.         IMPORT_CFM_FUNCTION HighestUnitNumber
  596.     ENDIF
  597.  
  598. ;
  599. ; extern OSErr DriverGestaltOn(DriverRefNum refNum)
  600. ;
  601.     IF GENERATINGCFM THEN
  602.         IMPORT_CFM_FUNCTION DriverGestaltOn
  603.     ENDIF
  604.  
  605. ;
  606. ; extern OSErr DriverGestaltOff(DriverRefNum refNum)
  607. ;
  608.     IF GENERATINGCFM THEN
  609.         IMPORT_CFM_FUNCTION DriverGestaltOff
  610.     ENDIF
  611.  
  612. ;
  613. ; extern Boolean DriverGestaltIsOn(DriverFlags flags)
  614. ;
  615.     IF GENERATINGCFM THEN
  616.         IMPORT_CFM_FUNCTION DriverGestaltIsOn
  617.     ENDIF
  618.  
  619.     ENDIF
  620.     IF ¨ OLDROUTINELOCATIONS THEN
  621.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  622. ;
  623. ; pascal OSErr PBOpenSync(ParmBlkPtr paramBlock)
  624. ;
  625.     IF ¨ GENERATINGCFM THEN
  626.         ; parameters:
  627.         ;    paramBlock      => A0
  628.         ; returns:
  629.         ;    OSErr           <= D0
  630.         _PBOpenSync:    OPWORD    $A000
  631.     ELSE
  632.         IMPORT_CFM_FUNCTION PBOpenSync
  633.     ENDIF
  634.  
  635. ;
  636. ; pascal OSErr PBOpenAsync(ParmBlkPtr paramBlock)
  637. ;
  638.     IF ¨ GENERATINGCFM THEN
  639.         ; parameters:
  640.         ;    paramBlock      => A0
  641.         ; returns:
  642.         ;    OSErr           <= D0
  643.         _PBOpenAsync:    OPWORD    $A400
  644.     ELSE
  645.         IMPORT_CFM_FUNCTION PBOpenAsync
  646.     ENDIF
  647.  
  648. ;
  649. ; pascal OSErr PBOpenImmed(ParmBlkPtr paramBlock)
  650. ;
  651.     IF ¨ GENERATINGCFM THEN
  652.         ; parameters:
  653.         ;    paramBlock      => A0
  654.         ; returns:
  655.         ;    OSErr           <= D0
  656.         _PBOpenImmed:    OPWORD    $A200
  657.     ELSE
  658.         IMPORT_CFM_FUNCTION PBOpenImmed
  659.     ENDIF
  660.  
  661. ;
  662. ; pascal OSErr PBCloseSync(ParmBlkPtr paramBlock)
  663. ;
  664.     IF ¨ GENERATINGCFM THEN
  665.         ; parameters:
  666.         ;    paramBlock      => A0
  667.         ; returns:
  668.         ;    OSErr           <= D0
  669.         _PBCloseSync:    OPWORD    $A001
  670.     ELSE
  671.         IMPORT_CFM_FUNCTION PBCloseSync
  672.     ENDIF
  673.  
  674. ;
  675. ; pascal OSErr PBCloseAsync(ParmBlkPtr paramBlock)
  676. ;
  677.     IF ¨ GENERATINGCFM THEN
  678.         ; parameters:
  679.         ;    paramBlock      => A0
  680.         ; returns:
  681.         ;    OSErr           <= D0
  682.         _PBCloseAsync:    OPWORD    $A401
  683.     ELSE
  684.         IMPORT_CFM_FUNCTION PBCloseAsync
  685.     ENDIF
  686.  
  687. ;
  688. ; pascal OSErr PBCloseImmed(ParmBlkPtr paramBlock)
  689. ;
  690.     IF ¨ GENERATINGCFM THEN
  691.         ; parameters:
  692.         ;    paramBlock      => A0
  693.         ; returns:
  694.         ;    OSErr           <= D0
  695.         _PBCloseImmed:    OPWORD    $A201
  696.     ELSE
  697.         IMPORT_CFM_FUNCTION PBCloseImmed
  698.     ENDIF
  699.  
  700. ;
  701. ; pascal OSErr PBReadSync(ParmBlkPtr paramBlock)
  702. ;
  703.     IF ¨ GENERATINGCFM THEN
  704.         ; parameters:
  705.         ;    paramBlock      => A0
  706.         ; returns:
  707.         ;    OSErr           <= D0
  708.         _PBReadSync:    OPWORD    $A002
  709.     ELSE
  710.         IMPORT_CFM_FUNCTION PBReadSync
  711.     ENDIF
  712.  
  713. ;
  714. ; pascal OSErr PBReadAsync(ParmBlkPtr paramBlock)
  715. ;
  716.     IF ¨ GENERATINGCFM THEN
  717.         ; parameters:
  718.         ;    paramBlock      => A0
  719.         ; returns:
  720.         ;    OSErr           <= D0
  721.         _PBReadAsync:    OPWORD    $A402
  722.     ELSE
  723.         IMPORT_CFM_FUNCTION PBReadAsync
  724.     ENDIF
  725.  
  726. ;
  727. ; pascal OSErr PBReadImmed(ParmBlkPtr paramBlock)
  728. ;
  729.     IF ¨ GENERATINGCFM THEN
  730.         ; parameters:
  731.         ;    paramBlock      => A0
  732.         ; returns:
  733.         ;    OSErr           <= D0
  734.         _PBReadImmed:    OPWORD    $A202
  735.     ELSE
  736.         IMPORT_CFM_FUNCTION PBReadImmed
  737.     ENDIF
  738.  
  739. ;
  740. ; pascal OSErr PBWriteSync(ParmBlkPtr paramBlock)
  741. ;
  742.     IF ¨ GENERATINGCFM THEN
  743.         ; parameters:
  744.         ;    paramBlock      => A0
  745.         ; returns:
  746.         ;    OSErr           <= D0
  747.         _PBWriteSync:    OPWORD    $A003
  748.     ELSE
  749.         IMPORT_CFM_FUNCTION PBWriteSync
  750.     ENDIF
  751.  
  752. ;
  753. ; pascal OSErr PBWriteAsync(ParmBlkPtr paramBlock)
  754. ;
  755.     IF ¨ GENERATINGCFM THEN
  756.         ; parameters:
  757.         ;    paramBlock      => A0
  758.         ; returns:
  759.         ;    OSErr           <= D0
  760.         _PBWriteAsync:    OPWORD    $A403
  761.     ELSE
  762.         IMPORT_CFM_FUNCTION PBWriteAsync
  763.     ENDIF
  764.  
  765. ;
  766. ; pascal OSErr PBWriteImmed(ParmBlkPtr paramBlock)
  767. ;
  768.     IF ¨ GENERATINGCFM THEN
  769.         ; parameters:
  770.         ;    paramBlock      => A0
  771.         ; returns:
  772.         ;    OSErr           <= D0
  773.         _PBWriteImmed:    OPWORD    $A203
  774.     ELSE
  775.         IMPORT_CFM_FUNCTION PBWriteImmed
  776.     ENDIF
  777.  
  778. ;
  779. ; pascal void AddDrive(short drvrRefNum, short drvNum, DrvQElPtr qEl)
  780. ;
  781.     IF ¨ GENERATINGCFM THEN
  782.         _AddDrive:    OPWORD    $A04E
  783.     ELSE
  784.         IMPORT_CFM_FUNCTION AddDrive
  785.     ENDIF
  786.  
  787.     ENDIF
  788. ;
  789. ; pascal QHdrPtr GetDrvQHdr(void )
  790. ;
  791.     IF ¨ GENERATINGCFM THEN
  792.         Macro
  793.         _GetDrvQHdr           &dest=(sp)
  794.             move.l            #$00000308,&dest
  795.         EndM
  796.     ELSE
  797.         IMPORT_CFM_FUNCTION GetDrvQHdr
  798.     ENDIF
  799.  
  800.     ENDIF
  801. ;  Control Panel Default Proc 
  802.     IF FOR_SYSTEM7_ONLY THEN
  803.     ENDIF
  804. ;
  805. ; pascal DCtlHandle GetDCtlEntry(short refNum)
  806. ;
  807.     IF GENERATINGCFM THEN
  808.         IMPORT_CFM_FUNCTION GetDCtlEntry
  809.     ENDIF
  810.  
  811. ;
  812. ;    SetChooserAlert used to simply set a bit in a low-mem global
  813. ;    to tell the Chooser not to display its warning message when
  814. ;    the printer is changed. However, under MultiFinder and System 7,
  815. ;    this low-mem is swapped out when a layer change occurs, and the
  816. ;    Chooser never sees the change. It is obsolete, and completely
  817. ;    unsupported on the PowerPC. 68K apps can still call it if they
  818. ;    wish.
  819. ;    
  820. ;
  821.     IF OLDROUTINENAMES ** ¨ GENERATINGCFM THEN
  822. ;
  823. ; pascal Boolean SetChooserAlert(Boolean f)
  824. ;
  825.     IF GENERATINGCFM THEN
  826.         IMPORT_CFM_FUNCTION SetChooserAlert
  827.     ENDIF
  828.  
  829.     ENDIF
  830. ;
  831. ; pascal OSErr DriverInstall(DRVRHeaderPtr drvrPtr, short refNum)
  832. ;
  833.     IF ¨ GENERATINGCFM THEN
  834.         ; parameters:
  835.         ;    drvrPtr         => A0
  836.         ;    refNum          => D0
  837.         ; returns:
  838.         ;    OSErr           <= D0
  839.         _DriverInstall:    OPWORD    $A03D
  840.     ELSE
  841.         IMPORT_CFM_FUNCTION DriverInstall
  842.     ENDIF
  843.  
  844. ;
  845. ; pascal OSErr DriverInstallReserveMem(DRVRHeaderPtr drvrPtr, short refNum)
  846. ;
  847.     IF ¨ GENERATINGCFM THEN
  848.         ; parameters:
  849.         ;    drvrPtr         => A0
  850.         ;    refNum          => D0
  851.         ; returns:
  852.         ;    OSErr           <= D0
  853.         _DriverInstallReserveMem:    OPWORD    $A43D
  854.     ELSE
  855.         IMPORT_CFM_FUNCTION DriverInstallReserveMem
  856.     ENDIF
  857.  
  858. ;
  859. ;  Note: DrvrInstall() is no longer supported, becuase it never really worked anyways.
  860. ;          There will soon be a DriverInstall() which does the right thing.
  861. ;
  862. ;        DrvrRemove has been renamed to DriverRemove.  But, InterfaceLib for PowerPC
  863. ;        still exports DrvrRemove, so a macro is used to map the new name to old.
  864. ;
  865. ;
  866. ;
  867. ; pascal OSErr DrvrRemove(short refNum)
  868. ;
  869.     IF ¨ GENERATINGCFM THEN
  870.         ; parameters:
  871.         ;    refNum          => D0
  872.         ; returns:
  873.         ;    OSErr           <= D0
  874.         _DrvrRemove:    OPWORD    $A03E
  875.     ELSE
  876.         IMPORT_CFM_FUNCTION DrvrRemove
  877.     ENDIF
  878.  
  879. ;
  880. ;    Shim mechnanism only exist in Copland world.  A Shim is a translation layer
  881. ;    and looks like a DRVR. 
  882. ;
  883. ;
  884. ; pascal OSStatus DriverInstallShim(DRVRHeaderPtr drvrPtr, ShimEntryPoint shim, short refNum, void *refcon)
  885. ;
  886.     IF GENERATINGCFM THEN
  887.         IMPORT_CFM_FUNCTION DriverInstallShim
  888.     ENDIF
  889.  
  890. ;
  891. ; pascal OSStatus DriverRemoveShim(short refNum)
  892. ;
  893.     IF GENERATINGCFM THEN
  894.         IMPORT_CFM_FUNCTION DriverRemoveShim
  895.     ENDIF
  896.  
  897. ;
  898. ; pascal OSStatus DriverReturnShimRefcon(short refNum, void **refcon)
  899. ;
  900.     IF GENERATINGCFM THEN
  901.         IMPORT_CFM_FUNCTION DriverReturnShimRefcon
  902.     ENDIF
  903.  
  904.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  905. ;
  906. ; extern OSErr IOShimCommandIsComplete(ParmBlkPtr thePB, OSErr result)
  907. ;
  908.     IF GENERATINGCFM THEN
  909.         IMPORT_CFM_FUNCTION IOShimCommandIsComplete
  910.     ENDIF
  911.  
  912.     ENDIF
  913.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  914. ;
  915. ; pascal OSErr PBControlSync(ParmBlkPtr paramBlock)
  916. ;
  917.     IF ¨ GENERATINGCFM THEN
  918.         ; parameters:
  919.         ;    paramBlock      => A0
  920.         ; returns:
  921.         ;    OSErr           <= D0
  922.         _PBControlSync:    OPWORD    $A004
  923.     ELSE
  924.         IMPORT_CFM_FUNCTION PBControlSync
  925.     ENDIF
  926.  
  927. ;
  928. ; pascal OSErr PBControlAsync(ParmBlkPtr paramBlock)
  929. ;
  930.     IF ¨ GENERATINGCFM THEN
  931.         ; parameters:
  932.         ;    paramBlock      => A0
  933.         ; returns:
  934.         ;    OSErr           <= D0
  935.         _PBControlAsync:    OPWORD    $A404
  936.     ELSE
  937.         IMPORT_CFM_FUNCTION PBControlAsync
  938.     ENDIF
  939.  
  940. ;
  941. ; pascal OSErr PBControlImmed(ParmBlkPtr paramBlock)
  942. ;
  943.     IF ¨ GENERATINGCFM THEN
  944.         ; parameters:
  945.         ;    paramBlock      => A0
  946.         ; returns:
  947.         ;    OSErr           <= D0
  948.         _PBControlImmed:    OPWORD    $A204
  949.     ELSE
  950.         IMPORT_CFM_FUNCTION PBControlImmed
  951.     ENDIF
  952.  
  953. ;
  954. ; pascal OSErr PBStatusSync(ParmBlkPtr paramBlock)
  955. ;
  956.     IF ¨ GENERATINGCFM THEN
  957.         ; parameters:
  958.         ;    paramBlock      => A0
  959.         ; returns:
  960.         ;    OSErr           <= D0
  961.         _PBStatusSync:    OPWORD    $A005
  962.     ELSE
  963.         IMPORT_CFM_FUNCTION PBStatusSync
  964.     ENDIF
  965.  
  966. ;
  967. ; pascal OSErr PBStatusAsync(ParmBlkPtr paramBlock)
  968. ;
  969.     IF ¨ GENERATINGCFM THEN
  970.         ; parameters:
  971.         ;    paramBlock      => A0
  972.         ; returns:
  973.         ;    OSErr           <= D0
  974.         _PBStatusAsync:    OPWORD    $A405
  975.     ELSE
  976.         IMPORT_CFM_FUNCTION PBStatusAsync
  977.     ENDIF
  978.  
  979. ;
  980. ; pascal OSErr PBStatusImmed(ParmBlkPtr paramBlock)
  981. ;
  982.     IF ¨ GENERATINGCFM THEN
  983.         ; parameters:
  984.         ;    paramBlock      => A0
  985.         ; returns:
  986.         ;    OSErr           <= D0
  987.         _PBStatusImmed:    OPWORD    $A205
  988.     ELSE
  989.         IMPORT_CFM_FUNCTION PBStatusImmed
  990.     ENDIF
  991.  
  992. ;
  993. ; pascal OSErr PBKillIOSync(ParmBlkPtr paramBlock)
  994. ;
  995.     IF ¨ GENERATINGCFM THEN
  996.         ; parameters:
  997.         ;    paramBlock      => A0
  998.         ; returns:
  999.         ;    OSErr           <= D0
  1000.         _PBKillIOSync:    OPWORD    $A006
  1001.     ELSE
  1002.         IMPORT_CFM_FUNCTION PBKillIOSync
  1003.     ENDIF
  1004.  
  1005. ;
  1006. ; pascal OSErr PBKillIOAsync(ParmBlkPtr paramBlock)
  1007. ;
  1008.     IF ¨ GENERATINGCFM THEN
  1009.         ; parameters:
  1010.         ;    paramBlock      => A0
  1011.         ; returns:
  1012.         ;    OSErr           <= D0
  1013.         _PBKillIOAsync:    OPWORD    $A406
  1014.     ELSE
  1015.         IMPORT_CFM_FUNCTION PBKillIOAsync
  1016.     ENDIF
  1017.  
  1018. ;
  1019. ; pascal OSErr PBKillIOImmed(ParmBlkPtr paramBlock)
  1020. ;
  1021.     IF ¨ GENERATINGCFM THEN
  1022.         ; parameters:
  1023.         ;    paramBlock      => A0
  1024.         ; returns:
  1025.         ;    OSErr           <= D0
  1026.         _PBKillIOImmed:    OPWORD    $A206
  1027.     ELSE
  1028.         IMPORT_CFM_FUNCTION PBKillIOImmed
  1029.     ENDIF
  1030.  
  1031.     ENDIF
  1032. ;
  1033. ; pascal short OpenDeskAcc(ConstStr255Param deskAccName)
  1034. ;
  1035.     IF ¨ GENERATINGCFM THEN
  1036.         _OpenDeskAcc:    OPWORD    $A9B6
  1037.     ELSE
  1038.         IMPORT_CFM_FUNCTION OpenDeskAcc
  1039.     ENDIF
  1040.  
  1041. ;
  1042. ; pascal void CloseDeskAcc(short refNum)
  1043. ;
  1044.     IF ¨ GENERATINGCFM THEN
  1045.         _CloseDeskAcc:    OPWORD    $A9B7
  1046.     ELSE
  1047.         IMPORT_CFM_FUNCTION CloseDeskAcc
  1048.     ENDIF
  1049.  
  1050.     IF OLDROUTINENAMES THEN
  1051. ;
  1052. ;    The PBxxx() routines are obsolete.  
  1053. ;    
  1054. ;    Use the PBxxxSync(), PBxxxAsync(), or PBxxxImmed version instead.
  1055. ;
  1056.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  1057.     IF ¨ OLDROUTINELOCATIONS THEN
  1058.     ENDIF
  1059.     ENDIF
  1060.     ENDIF
  1061.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  1062. ;
  1063. ;//////////////////////////////////////////////////////////////////////////////
  1064. ; System 8 Ndrv requests entry point drivers
  1065. ;
  1066. ;
  1067. ; extern OSStatus DoDeviceManagerIO(IOCommandID commandID, IOCommandContents contents, IOCommandCode code, IOCommandKind kind, KernelNotification *someTypeofNotification)
  1068. ;
  1069.     IF GENERATINGCFM THEN
  1070.         IMPORT_CFM_FUNCTION DoDeviceManagerIO
  1071.     ENDIF
  1072.  
  1073. DeviceManagerIOIteratorData RECORD 0
  1074. ioCI                     ds        IOCommonInfo    ; offset: $0 (0)
  1075. pluginNumber             ds.w    1                ; offset: $14 (20)
  1076. refNum                     ds.w    1                ; offset: $16 (22)
  1077. desc                     ds        DriverDescription ; offset: $18 (24)
  1078. sizeof                     EQU *                    ; size:   $98 (152)
  1079.                         ENDR
  1080. ;
  1081. ; extern OSStatus DeviceManagerGetDeviceData(ItemCount requestItemCount, ItemCount *totalItemCount, DeviceManagerIOIteratorData **dataArray)
  1082. ;
  1083.     IF GENERATINGCFM THEN
  1084.         IMPORT_CFM_FUNCTION DeviceManagerGetDeviceData
  1085.     ENDIF
  1086.  
  1087.     ENDIF
  1088.     ENDIF ; __DEVICES__ 
  1089.  
  1090.